package com.le.tester.tip;

import com.le.tester.javaThink.fourth.net.mindview.util.Print;

import java.util.Date;

/**
 * createTime：2022/2/11 13:55
 * description：时间增加
 */
public class DateAdd {
    public static void main(String[] args) {
        long addNum = 15 * 60 * 1000;
        Date date = new Date();
        System.out.println("currentTime is " + date);
        long resultTime = Math.addExact(date.getTime(), addNum);
        Date resultDate = new Date(resultTime);
        Print.print("resultTime is " + resultDate);
    }
}
